<admintpl file="header" />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
  <div class="nav">
    <ul class="cc">
      <li class="current"><a href="javascript:;">所有文件 {:get_size($all_size)} kb</a></li>
      <!-- <li><a target="_self" href="#">上传</a></li> -->
    </ul>
  </div>
  <div class="h_a">搜索 --- </div>
  <form  method="post" action="#">
    <div class="search_type cc mb10">
      <div class="mb10"> 
        <span class="mr20">分类：
        <select class="select_2" name="term">
            <option value='0' >全部</option>
            {$taxonomys}
        </select>
        &nbsp;&nbsp;时间：
        <input type="text" name="start_time" class="input length_2 J_date" value="{$formget.start_time}" style="width:80px;" autocomplete="off">-<input type="text" class="input length_2 J_date" name="end_time" value="{$formget.end_time}" style="width:80px;" autocomplete="off">
        
        <!-- 
        <select class="select_2" name="searchtype" style="width:70px;">
          <option value='0' >标题</option>
        </select>
         -->
               &nbsp; &nbsp;关键字：
        <input type="text" class="input length_2" name="keyword" style="width:200px;" value="{$formget.keyword}" placeholder="请输入关键字...">
        <input type="submit" class="btn" value="搜索"/>
        </span>
      </div>
    </div>
  </form>


  <form class="J_ajaxForm" action="" method="post">
    <div class="table_list">
      <table width="100%">
        <thead>
            <tr>
              <td width="16"><label><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x"></label></td>

              <td>ID</td>
              <td>文件名</td>
              <!-- <td>URL</td> -->
              <!-- <td>点击量</td> -->
              <td width="80">大小</td>
              <td width="120"><span>发布时间</span></td>

              <td width="120">操作</td>
            </tr>
        </thead>
<?php
function get_size($size){
  echo round( ($size/1024) ,1);
}
?>
          <foreach name="list" item="vo">
            <tr>
                <td><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="{$vo.id}" ></td>

                <td><a>{$vo.id}</a></td>
                <!-- <td>{$vo.file_name}</td> -->
                <td><a class="group1" href="{$vo.url}">{$vo.file_name}</a></td>

                <td><?php get_size($vo['size']);?> KB</td>
                <td>{$vo.create_time|date="Y-m-d H:i",###}</td>

                <td>
                  <a href="{:U('Admin/Upyun/deleteFile',array('id'=>$vo['id']))}" class="J_ajax_del" >删除</a>
                </td>
            </tr>
          </foreach>
          </table>
      <div class="p10"><div class="pages"> {$Page} </div> </div>

    </div>
    <div>
      <div class="btn_wrap_pd">
        <label class="mr20"><input type="checkbox" class="J_check_all" data-direction="y" data-checklist="J_check_y">全选</label>         

        <button class="btn J_ajax_submit_btn" type="submit" data-action="{:u('upyun/deleteFile')}" data-subcheck="true" data-msg="你确定删除吗？">删除</button>

      </div>
    </div>
  </form>
</div>
<script src="__ROOT__/statics/js/common.js{$js_debug}"></script>
<script>

function refersh_window() {
    var refersh_time = getCookie('refersh_time');
    if (refersh_time == 1) {
        window.location="{:u('post/index',$formget)}";
    }
}
setInterval(function(){
  refersh_window();
}, 2000);
$(function () {
  setCookie("refersh_time",0);
    Wind.use('ajaxForm','artDialog','iframeTools', function () {
        //批量移动
        $('#J_Content_remove').click(function (e) {
            var str = 0;
            var id = tag = '';
            $("input[name='ids[]']").each(function () {
                if ($(this).attr('checked')) {
                    str = 1;
                    id += tag + $(this).val();
                    tag = ',';
                }
            });
            if (str == 0) {
        art.dialog.through({
          id:'error',
          icon: 'error',
          content: '您没有勾选信息，无法进行操作！',
          cancelVal: '关闭',
          cancel: true
        });
                return false;
            }
            var $this = $(this);
            art.dialog.open("__ROOT__/index.php?g=admin&m=post&a=move&ids=" + id, {
                title: "批量移动"
            });
        });
    });
});


</script>
<script type="text/javascript" src="http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css">
<script>
$(document).ready(function() {
  //Examples of how to assign the ColorBox event to elements
  $(".group1").colorbox({
    rel: 'group1'
  });
  $(".group2").colorbox({
    rel: 'group2',
    transition: "fade"
  });
  $(".group3").colorbox({
    rel: 'group3',
    transition: "none",
    width: "75%",
    height: "75%"
  });
  $(".group4").colorbox({
    rel: 'group4',
    slideshow: true
  });
  $(".ajax").colorbox();
  $(".youtube").colorbox({
    iframe: true,
    innerWidth: 425,
    innerHeight: 344
  });
  $(".iframe").colorbox({
    iframe: true,
    width: "80%",
    height: "80%"
  });
  $(".inline").colorbox({
    inline: true,
    width: "50%"
  });
  $(".callbacks").colorbox({
    onOpen: function() {
      alert('onOpen: colorbox is about to open');
    },
    onLoad: function() {
      alert('onLoad: colorbox has started to load the targeted content');
    },
    onComplete: function() {
      alert('onComplete: colorbox has displayed the loaded content');
    },
    onCleanup: function() {
      alert('onCleanup: colorbox has begun the close process');
    },
    onClosed: function() {
      alert('onClosed: colorbox has completely closed');
    }
  });

  //Example of preserving a JavaScript event for inline calls.
  $("#click").click(function() {
    $('#click').css({
      "background-color": "#f00",
      "color": "#fff",
      "cursor": "inherit"
    }).text("Open this window again and this message will still be here.");
    return false;
  });
});
</script>
<!--  -->
</body>
</html>